/**
 * 自定义的一些通用导出方法，常量等
 * Created by 10691 on 17/5/19.
 */

import React, {} from 'react';
import {View, ActivityIndicator, Text, Dimensions} from 'react-native';

/**
 * 屏幕的宽度
 */
export const screenWidth = Dimensions.get('window').width;

/**
 * 屏幕的高度
 */
export const screenHeight = Dimensions.get('window').height;

/**
 * 渲染ListView的头部
 */
export function renderHeader() {
    return (
        <View style={{
            width: screenWidth,
            height: 45,
            backgroundColor: '#f4f4f4',
            justifyContent: 'center',
            alignItems: 'center',
        }}>
            <Text>根据每条折扣的点击进行统计,每5分钟更新一次</Text>
        </View>
    )
}

/**
 * ListView通用的加载页脚
 * @returns {XML}
 */
export function renderFooter() {
    return (
        <View style={{height: 100, justifyContent: 'center'}}>
            <ActivityIndicator size='large'/>
        </View>
    );
}